package com.cn.trip.service;

import com.cn.trip.DbDao.OrderDao;
import com.cn.trip.bean.Order;

import java.util.Date;

public class OrderService {
	public boolean add(int user_id,float money) {
		Order o=new Order();
		o.setDate(new Date().toLocaleString());
		o.setOrder_num(new Date().getTime());
		o.setUser_id(user_id);
		o.setMoney(money);
		if(new OrderDao().addOrder(o)>0) {
			return true;
		}
		return false;
	}
	
	
}
